package com.whm.system.service.impl;

import java.util.List;
import com.whm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.whm.system.mapper.BWorkDailyMapper;
import com.whm.system.domain.BWorkDaily;
import com.whm.system.service.IBWorkDailyService;

/**
 * 工作日报Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-24
 */
@Service
public class BWorkDailyServiceImpl implements IBWorkDailyService 
{
    @Autowired
    private BWorkDailyMapper bWorkDailyMapper;

    /**
     * 查询工作日报
     * 
     * @param id 工作日报主键
     * @return 工作日报
     */
    @Override
    public BWorkDaily selectBWorkDailyById(Long id)
    {
        return bWorkDailyMapper.selectBWorkDailyById(id);
    }

    /**
     * 查询工作日报列表
     * 
     * @param bWorkDaily 工作日报
     * @return 工作日报
     */
    @Override
    public List<BWorkDaily> selectBWorkDailyList(BWorkDaily bWorkDaily)
    {
        return bWorkDailyMapper.selectBWorkDailyList(bWorkDaily);
    }

    /**
     * 新增工作日报
     * 
     * @param bWorkDaily 工作日报
     * @return 结果
     */
    @Override
    public int insertBWorkDaily(BWorkDaily bWorkDaily)
    {
        bWorkDaily.setCreateTime(DateUtils.getNowDate());
        return bWorkDailyMapper.insertBWorkDaily(bWorkDaily);
    }

    /**
     * 修改工作日报
     * 
     * @param bWorkDaily 工作日报
     * @return 结果
     */
    @Override
    public int updateBWorkDaily(BWorkDaily bWorkDaily)
    {
        bWorkDaily.setUpdateTime(DateUtils.getNowDate());
        return bWorkDailyMapper.updateBWorkDaily(bWorkDaily);
    }

    /**
     * 批量删除工作日报
     * 
     * @param ids 需要删除的工作日报主键
     * @return 结果
     */
    @Override
    public int deleteBWorkDailyByIds(Long[] ids)
    {
        return bWorkDailyMapper.deleteBWorkDailyByIds(ids);
    }

    /**
     * 删除工作日报信息
     * 
     * @param id 工作日报主键
     * @return 结果
     */
    @Override
    public int deleteBWorkDailyById(Long id)
    {
        return bWorkDailyMapper.deleteBWorkDailyById(id);
    }
}
